package cn.tedu._07weibo.base.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 自定义枚举类状态码
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum StatusCode {
    //所有枚举类的实例都写在属性上面
    OPERATION_SUCCESS(2001,"操作成功"),
    OPERATION_FAILED(2002,"操作失败"),
    USERNAME_EXISTS(1002,"用户名被占用"),
    USERNAME_PASSWORD_ERROR(1001,"用户名或密码错误"),
    NOT_LOGIN(1000,"未登录"),
    VALIDATED_ERROR (6000,"参数校验失败"),
    THROWABLE_ERROR(8888,"服务区异常，请稍后重试...");
    //定义属性
    private Integer status;
    private String message;
}
